<!-- HTML header for doxygen 1.8.9.1-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>ROSS: core/ross-random.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <a href="https://github.com/ROSS-org/ROSS">
   <div id="projectname">ROSS
   </div>
   </a>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_af18cf245e3394ab3b436135935cfd6e.html">core</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">ross-random.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="ross-random_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef INC_tw_rand_h</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define INC_tw_rand_h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00004"></a><span class="lineno"><a class="line" href="ross-random_8h.html#a1a20cba323e9c15780c33c3aff02140e">    4</a></span>&#160;<span class="preprocessor">#define tw_opi 6.28318530718</span></div>
<div class="line"><a name="l00005"></a><span class="lineno"><a class="line" href="ross-random_8h.html#a39fc493bbf61e55264a6daa82e8109ab">    5</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define tw_rand_unif(G)                 rng_gen_val(G)</span></div>
<div class="line"><a name="l00006"></a><span class="lineno"><a class="line" href="ross-random_8h.html#a9d938fae0821e40b672e49acecd80a3c">    6</a></span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define tw_rand_reverse_unif(G) rng_gen_reverse_val(G)</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00008"></a><span class="lineno"><a class="line" href="ross-random_8h.html#a1af94350f8b70da9f710c65b0634c97a">    8</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structtw__rng.html">tw_rng</a> <a class="code" href="structtw__rng.html">tw_rng</a>;</div>
<div class="line"><a name="l00009"></a><span class="lineno"><a class="line" href="ross-random_8h.html#aa9f36434183e08612af1e7bbb2ed666d">    9</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">struct </span><a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> <a class="code" href="structtw__rng__stream.html">tw_rng_stream</a>;</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> * Public Function Prototypes</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="keyword">extern</span> <a class="code" href="structtw__rng.html">tw_rng</a>   *<a class="code" href="ross-random_8h.html#a5600e4cb011d29cc24a2408220d58909">tw_rand_init</a>(uint32_t v, uint32_t w);</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">void</span>     <a class="code" href="ross-random_8h.html#a9179f0148c620729309111ad61a3fa5b">tw_rand_initial_seed</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <a class="code" href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a> <span class="keywordtype">id</span>);</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">long</span>     <a class="code" href="ross-random_8h.html#a56ae5b708a840eb42ad336f8852b6d5e">tw_rand_integer</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">long</span> low, <span class="keywordtype">long</span> high);</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> <a class="code" href="ross-random_8h.html#a58c39b87e177cf5f8e8312e02f21782e">tw_rand_ulong</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> low, <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> high);</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">long</span>     <a class="code" href="ross-random_8h.html#a599b01ae062d3a8517c803e3349cf771">tw_rand_binomial</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">long</span> N, <span class="keywordtype">double</span> P);</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">double</span>   <a class="code" href="ross-random_8h.html#ac042351acc76e850fd420dd41f0d58eb">tw_rand_exponential</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">double</span> Lambda);</div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">double</span>   <a class="code" href="ross-random_8h.html#a8dd208314b255494335ed16c324c29cf">tw_rand_pareto</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">double</span> scale, <span class="keywordtype">double</span> shape);</div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">double</span>   <a class="code" href="ross-random_8h.html#a33ef78bb479bf2642fb38490c79e0fc8">tw_rand_gamma</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">double</span> shape, <span class="keywordtype">double</span> scale);</div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">long</span>     <a class="code" href="ross-random_8h.html#a9eeb025da6834fc04b6d107fd6118a5f">tw_rand_geometric</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">double</span> P);</div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">double</span>   <a class="code" href="ross-random_8h.html#aeb86f64e46e19ed8b3176b5a273c4aac">tw_rand_normal01</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *rng_calls);</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">double</span>   <a class="code" href="ross-random_8h.html#a3403d336421708331348cd7bce0b32f3">tw_rand_normal_sd</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">double</span> Mu, <span class="keywordtype">double</span> Sd, <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> *rng_calls);</div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">long</span>     <a class="code" href="ross-random_8h.html#ad442a45d2d71a342d1ebb1f183caad83">tw_rand_poisson</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">double</span> Lambda);</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="keyword">extern</span> <span class="keywordtype">double</span>   <a class="code" href="ross-random_8h.html#aa5fcd32f48d8cdb58b0d604a71eb209d">tw_rand_weibull</a>(<a class="code" href="structtw__rng__stream.html">tw_rng_stream</a> * g, <span class="keywordtype">double</span> <a class="code" href="phold_8h.html#ad4bbf91c2b6e66b1ad2a070b77b62442">mean</a>, <span class="keywordtype">double</span> shape);</div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;</div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="ttc" id="ross-random_8h_html_a33ef78bb479bf2642fb38490c79e0fc8"><div class="ttname"><a href="ross-random_8h.html#a33ef78bb479bf2642fb38490c79e0fc8">tw_rand_gamma</a></div><div class="ttdeci">double tw_rand_gamma(tw_rng_stream *g, double shape, double scale)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00081">ross-random.c:81</a></div></div>
<div class="ttc" id="ross-random_8h_html_a8dd208314b255494335ed16c324c29cf"><div class="ttname"><a href="ross-random_8h.html#a8dd208314b255494335ed16c324c29cf">tw_rand_pareto</a></div><div class="ttdeci">double tw_rand_pareto(tw_rng_stream *g, double scale, double shape)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00075">ross-random.c:75</a></div></div>
<div class="ttc" id="ross-random_8h_html_ac042351acc76e850fd420dd41f0d58eb"><div class="ttname"><a href="ross-random_8h.html#ac042351acc76e850fd420dd41f0d58eb">tw_rand_exponential</a></div><div class="ttdeci">double tw_rand_exponential(tw_rng_stream *g, double Lambda)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00069">ross-random.c:69</a></div></div>
<div class="ttc" id="structtw__rng_html"><div class="ttname"><a href="structtw__rng.html">tw_rng</a></div><div class="ttdef"><b>Definition:</b> <a href="rand-clcg4_8h_source.html#l00006">rand-clcg4.h:6</a></div></div>
<div class="ttc" id="phold_8h_html_ad4bbf91c2b6e66b1ad2a070b77b62442"><div class="ttname"><a href="phold_8h.html#ad4bbf91c2b6e66b1ad2a070b77b62442">mean</a></div><div class="ttdeci">static tw_stime mean</div><div class="ttdef"><b>Definition:</b> <a href="phold_8h_source.html#l00037">phold.h:37</a></div></div>
<div class="ttc" id="ross-random_8h_html_a56ae5b708a840eb42ad336f8852b6d5e"><div class="ttname"><a href="ross-random_8h.html#a56ae5b708a840eb42ad336f8852b6d5e">tw_rand_integer</a></div><div class="ttdeci">long tw_rand_integer(tw_rng_stream *g, long low, long high)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00021">ross-random.c:21</a></div></div>
<div class="ttc" id="ross-random_8h_html_ad442a45d2d71a342d1ebb1f183caad83"><div class="ttname"><a href="ross-random_8h.html#ad442a45d2d71a342d1ebb1f183caad83">tw_rand_poisson</a></div><div class="ttdeci">long tw_rand_poisson(tw_rng_stream *g, double Lambda)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00188">ross-random.c:188</a></div></div>
<div class="ttc" id="ross-random_8h_html_a3403d336421708331348cd7bce0b32f3"><div class="ttname"><a href="ross-random_8h.html#a3403d336421708331348cd7bce0b32f3">tw_rand_normal_sd</a></div><div class="ttdeci">double tw_rand_normal_sd(tw_rng_stream *g, double Mu, double Sd, unsigned int *rng_calls)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00182">ross-random.c:182</a></div></div>
<div class="ttc" id="ross_8h_html_a911515dff2fb79886a16ed44df5f9d20"><div class="ttname"><a href="ross_8h.html#a911515dff2fb79886a16ed44df5f9d20">tw_lpid</a></div><div class="ttdeci">uint64_t tw_lpid</div><div class="ttdef"><b>Definition:</b> <a href="ross_8h_source.html#l00160">ross.h:160</a></div></div>
<div class="ttc" id="ross-random_8h_html_aeb86f64e46e19ed8b3176b5a273c4aac"><div class="ttname"><a href="ross-random_8h.html#aeb86f64e46e19ed8b3176b5a273c4aac">tw_rand_normal01</a></div><div class="ttdeci">double tw_rand_normal01(tw_rng_stream *g, unsigned int *rng_calls)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00152">ross-random.c:152</a></div></div>
<div class="ttc" id="ross-random_8h_html_a9eeb025da6834fc04b6d107fd6118a5f"><div class="ttname"><a href="ross-random_8h.html#a9eeb025da6834fc04b6d107fd6118a5f">tw_rand_geometric</a></div><div class="ttdeci">long tw_rand_geometric(tw_rng_stream *g, double P)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00141">ross-random.c:141</a></div></div>
<div class="ttc" id="ross-random_8h_html_a58c39b87e177cf5f8e8312e02f21782e"><div class="ttname"><a href="ross-random_8h.html#a58c39b87e177cf5f8e8312e02f21782e">tw_rand_ulong</a></div><div class="ttdeci">unsigned long tw_rand_ulong(tw_rng_stream *g, unsigned long low, unsigned long high)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00037">ross-random.c:37</a></div></div>
<div class="ttc" id="ross-random_8h_html_aa5fcd32f48d8cdb58b0d604a71eb209d"><div class="ttname"><a href="ross-random_8h.html#aa5fcd32f48d8cdb58b0d604a71eb209d">tw_rand_weibull</a></div><div class="ttdeci">double tw_rand_weibull(tw_rng_stream *g, double mean, double shape)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00215">ross-random.c:215</a></div></div>
<div class="ttc" id="ross-random_8h_html_a599b01ae062d3a8517c803e3349cf771"><div class="ttname"><a href="ross-random_8h.html#a599b01ae062d3a8517c803e3349cf771">tw_rand_binomial</a></div><div class="ttdeci">long tw_rand_binomial(tw_rng_stream *g, long N, double P)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00053">ross-random.c:53</a></div></div>
<div class="ttc" id="ross-random_8h_html_a9179f0148c620729309111ad61a3fa5b"><div class="ttname"><a href="ross-random_8h.html#a9179f0148c620729309111ad61a3fa5b">tw_rand_initial_seed</a></div><div class="ttdeci">void tw_rand_initial_seed(tw_rng_stream *g, tw_lpid id)</div><div class="ttdef"><b>Definition:</b> <a href="rand-clcg4_8c_source.html#l00265">rand-clcg4.c:265</a></div></div>
<div class="ttc" id="structtw__rng__stream_html"><div class="ttname"><a href="structtw__rng__stream.html">tw_rng_stream</a></div><div class="ttdef"><b>Definition:</b> <a href="rand-clcg4_8h_source.html#l00032">rand-clcg4.h:32</a></div></div>
<div class="ttc" id="ross-random_8h_html_a5600e4cb011d29cc24a2408220d58909"><div class="ttname"><a href="ross-random_8h.html#a5600e4cb011d29cc24a2408220d58909">tw_rand_init</a></div><div class="ttdeci">tw_rng * tw_rand_init(uint32_t v, uint32_t w)</div><div class="ttdef"><b>Definition:</b> <a href="ross-random_8c_source.html#l00007">ross-random.c:7</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>
